package com.esri.core.internal.util;

import java.lang.reflect.InvocationTargetException;

/* loaded from: classes.dex */
public final class f {
    public static final String a = "10.2.4";
    public static final String b = "10.2.5";
    public static String c = "ArcGIS.JavaSE.10.2.4";
    private static final NativeLoader d;

    static {
        String property = System.getProperty("java.vm.name");
        if (property != null && property.equalsIgnoreCase("Dalvik")) {
            c = "ArcGIS.Android-10.2.5";
            d = new NativeLoader() { // from class: com.esri.core.internal.util.f.1
                @Override // com.esri.core.internal.util.NativeLoader
                public boolean isAndroid() {
                    return true;
                }

                @Override // com.esri.core.internal.util.NativeLoader
                public void initialize() {
                    f.b("com.esri.core.internal.RuntimeHelper");
                }
            };
            return;
        }
        d = new NativeLoader() { // from class: com.esri.core.internal.util.f.2
            @Override // com.esri.core.internal.util.NativeLoader
            public boolean isAndroid() {
                return false;
            }

            @Override // com.esri.core.internal.util.NativeLoader
            public void initialize() {
                f.b("com.esri.runtime.ArcGISRuntime");
            }
        };
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static void b(String str) {
        try {
            Class.forName(str).getMethod("initialize", new Class[0]).invoke(null, new Object[0]);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e2) {
            e2.printStackTrace();
        } catch (IllegalArgumentException e3) {
            e3.printStackTrace();
        } catch (NoSuchMethodException e4) {
            e4.printStackTrace();
        } catch (SecurityException e5) {
            e5.printStackTrace();
        } catch (InvocationTargetException e6) {
            e6.printStackTrace();
        }
    }

    public static final synchronized NativeLoader a() {
        NativeLoader nativeLoader;
        synchronized (f.class) {
            nativeLoader = d;
        }
        return nativeLoader;
    }
}
